import * as TestUtil from '../../../../libs/shared/src/utils/test-utils'
import type {
    AccountBase,
    AccountsGetResponse,
    Holding,
    InvestmentsHoldingsGetResponse,
    InvestmentsTransactionsGetResponse,
    Item,
    TransactionsGetResponse,
} from 'plaid'

import {
    Products,
    ItemUpdateTypeEnum,
    AccountSubtype,
    InvestmentTransactionType,
    InvestmentTransactionSubtype,
    AccountType,
} from 'plaid'

/**
 * A Wealthfront connection with multiple 529 Savings plans, and multiple cash accounts
 * within each of the savings plans (introducing duplicates)
 *
 * This is a real connection scrubbed of any sensitive data, retrieved directly from the Plaid API
 *
 * Date Range:
 *   start: '2022-06-10'
 *   end: '2022-06-22'
 */

/** Reusable Entity values (Item, Accounts) */

const item: Item = {
    available_products: [Products.Auth, Products.Balance],
    billed_products: [Products.Investments, Products.Transactions],
    consent_expiration_time: null,
    error: null,
    institution_id: 'ins_115617',
    item_id: '0vOzwnRxMzCwkXmmd3wdC0Nd6vv3gYUeab1XX',
    optional_products: null,
    products: [Products.Investments, Products.Transactions],
    update_type: ItemUpdateTypeEnum.Background,
    webhook: 'https://www.mockwebhook.com/v1/plaid/webhook',
}

const accounts: AccountBase[] = [
    {
        account_id: 'Xxa6YXPbv6UXwNkkDmXDTnwzdkM4NqFjwev6qq',
        balances: {
            available: null,
            current: 558.679353,
            iso_currency_code: 'USD',
            limit: null,
            unofficial_currency_code: null,
        },
        mask: '0653',
        name: '***0653',
        official_name: '529 College Savings Account',
        subtype: AccountSubtype._529,
        type: AccountType.Investment,
    },
    {
        account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
        balances: {
            available: null,
            current: 11576.775367,
            iso_currency_code: 'USD',
            limit: null,
            unofficial_currency_code: null,
        },
        mask: '6104',
        name: '**6104',
        official_name: '529 College Savings Account',
        subtype: AccountSubtype._529,
        type: AccountType.Investment,
    },
    {
        account_id: 'pyp6wx7OK6HjN766D9jDF1aoVQ40AOtL1BPazL',
        balances: {
            available: null,
            current: 2103.164223,
            iso_currency_code: 'USD',
            limit: null,
            unofficial_currency_code: null,
        },
        mask: '8813',
        name: '***8813',
        official_name: '529 College Savings Account',
        subtype: AccountSubtype._529,
        type: AccountType.Investment,
    },
    {
        account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
        balances: {
            available: null,
            current: 6569.01,
            iso_currency_code: 'USD',
            limit: null,
            unofficial_currency_code: null,
        },
        mask: '9101',
        name: '***9101',
        official_name: 'Joint Investment Account',
        subtype: AccountSubtype._529,
        type: AccountType.Investment,
    },
]

const holdings: Holding[] = [
    {
        account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 30.7,
        iso_currency_code: 'USD',
        quantity: 30.7,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
        cost_basis: 41.42,
        institution_price: 41.79,
        institution_price_as_of: '2022-06-22',
        institution_value: 41.79,
        iso_currency_code: 'USD',
        quantity: 1,
        security_id: 'VK0EQ5Ea13u9QqNrYJ9qINz0Jd0ZYMHQ79bd0',
        unofficial_currency_code: null,
    },
    {
        account_id: 'Xxa6YXPbv6UXwNkkDmXDTnwzdkM4NqFjwev6qq',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 45.450271,
        iso_currency_code: 'USD',
        quantity: 4.4867,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'Xxa6YXPbv6UXwNkkDmXDTnwzdkM4NqFjwev6qq',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 69.691449,
        iso_currency_code: 'USD',
        quantity: 5.3159,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
        cost_basis: 43.83,
        institution_price: 71.97,
        institution_price_as_of: '2022-06-22',
        institution_value: 71.97,
        iso_currency_code: 'USD',
        quantity: 1,
        security_id: 'XARE85EJqKsjxyPpp93mtPABJMBv8Nf7jxaDo',
        unofficial_currency_code: null,
    },
    {
        account_id: 'Xxa6YXPbv6UXwNkkDmXDTnwzdkM4NqFjwev6qq',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 75.253552,
        iso_currency_code: 'USD',
        quantity: 6.8662,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'Xxa6YXPbv6UXwNkkDmXDTnwzdkM4NqFjwev6qq',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 80.197623,
        iso_currency_code: 'USD',
        quantity: 5.6517,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'Xxa6YXPbv6UXwNkkDmXDTnwzdkM4NqFjwev6qq',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 82.057008,
        iso_currency_code: 'USD',
        quantity: 4.4022,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'Xxa6YXPbv6UXwNkkDmXDTnwzdkM4NqFjwev6qq',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 92.207621,
        iso_currency_code: 'USD',
        quantity: 7.1093,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'Xxa6YXPbv6UXwNkkDmXDTnwzdkM4NqFjwev6qq',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 107.504558,
        iso_currency_code: 'USD',
        quantity: 5.8142,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'pyp6wx7OK6HjN766D9jDF1aoVQ40AOtL1BPazL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 164.390653,
        iso_currency_code: 'USD',
        quantity: 16.2281,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'pyp6wx7OK6HjN766D9jDF1aoVQ40AOtL1BPazL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 249.044115,
        iso_currency_code: 'USD',
        quantity: 18.9965,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'pyp6wx7OK6HjN766D9jDF1aoVQ40AOtL1BPazL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 273.652731,
        iso_currency_code: 'USD',
        quantity: 19.2849,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'pyp6wx7OK6HjN766D9jDF1aoVQ40AOtL1BPazL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 317.10568,
        iso_currency_code: 'USD',
        quantity: 28.933,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'pyp6wx7OK6HjN766D9jDF1aoVQ40AOtL1BPazL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 325.061096,
        iso_currency_code: 'USD',
        quantity: 17.4389,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'pyp6wx7OK6HjN766D9jDF1aoVQ40AOtL1BPazL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 347.328818,
        iso_currency_code: 'USD',
        quantity: 26.7794,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'pyp6wx7OK6HjN766D9jDF1aoVQ40AOtL1BPazL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 402.876761,
        iso_currency_code: 'USD',
        quantity: 21.7889,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
        cost_basis: 599.68,
        institution_price: 140.96,
        institution_price_as_of: '2022-06-22',
        institution_value: 563.84,
        iso_currency_code: 'USD',
        quantity: 4,
        security_id: 'NLqaJoaK5wFr6M0gmB01cnQpgJpNk6tKzrE74',
        unofficial_currency_code: null,
    },
    {
        account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
        cost_basis: 866.06,
        institution_price: 49.275,
        institution_price_as_of: '2022-06-22',
        institution_value: 788.4,
        iso_currency_code: 'USD',
        quantity: 16,
        security_id: '8wyZkVZm60synVQxLxVMHn0jB5jZJat5krq4q',
        unofficial_currency_code: null,
    },
    {
        account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 882.020113,
        iso_currency_code: 'USD',
        quantity: 87.0701,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
        cost_basis: 956.61,
        institution_price: 49.35,
        institution_price_as_of: '2022-06-22',
        institution_value: 987,
        iso_currency_code: 'USD',
        quantity: 20,
        security_id: '6aEJyVJ5dAsP6RKmkjoPC9BEkeEYpKu6ZqObP',
        unofficial_currency_code: null,
    },
    {
        account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
        cost_basis: 1089.530015,
        institution_price: 31.76,
        institution_price_as_of: '2022-06-22',
        institution_value: 1111.6,
        iso_currency_code: 'USD',
        quantity: 35,
        security_id: 'x1RMwKMjNqsm40xmAAbVFoXN4rNVJ5cLpvR45',
        unofficial_currency_code: null,
    },
    {
        account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 1402.856526,
        iso_currency_code: 'USD',
        quantity: 107.0066,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 1487.398638,
        iso_currency_code: 'USD',
        quantity: 104.8202,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 1704.47728,
        iso_currency_code: 'USD',
        quantity: 155.518,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 1832.14424,
        iso_currency_code: 'USD',
        quantity: 98.291,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 1899.706821,
        iso_currency_code: 'USD',
        quantity: 146.4693,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
        cost_basis: null,
        institution_price: 1,
        institution_price_as_of: '2022-06-22',
        institution_value: 2235.418812,
        iso_currency_code: 'USD',
        quantity: 120.8988,
        security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
        unofficial_currency_code: null,
    },
    {
        account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
        cost_basis: 3049.41002,
        institution_price: 44.09,
        institution_price_as_of: '2022-06-22',
        institution_value: 2998.12,
        iso_currency_code: 'USD',
        quantity: 68,
        security_id: 'KdDjmojBERUKxX8Ln6wdUadEgLE7o5cZ306Xk',
        unofficial_currency_code: null,
    },
]

/** API Responses */

export const accountsGetResponse = TestUtil.axiosSuccess<AccountsGetResponse>({
    accounts,
    item,
    request_id: 'd2YZktLMJfDo2Aj',
})

export const holdingsGetResponse = TestUtil.axiosSuccess<InvestmentsHoldingsGetResponse>({
    accounts,
    holdings,
    item,
    request_id: '0K8515MDZrUFFkS',
    securities: [
        {
            close_price: 49.34,
            close_price_as_of: '2022-06-21',
            cusip: '46434G103',
            institution_id: null,
            institution_security_id: null,
            is_cash_equivalent: false,
            isin: 'US46434G1031',
            iso_currency_code: 'USD',
            name: 'iShares Core MSCI Emerging Market',
            proxy_security_id: null,
            security_id: '6aEJyVJ5dAsP6RKmkjoPC9BEkeEYpKu6ZqObP',
            sedol: 'B8NDCB6',
            ticker_symbol: 'IEMG',
            type: 'etf',
            unofficial_currency_code: null,
        },
        {
            close_price: null,
            close_price_as_of: null,
            cusip: '9ZZZFD989',
            institution_id: null,
            institution_security_id: null,
            is_cash_equivalent: true,
            isin: null,
            iso_currency_code: 'USD',
            name: 'U S Dollar',
            proxy_security_id: null,
            security_id: '7dD8KV8owvUgA3rkNbmLtLPy8Kyr9dFQmvKD4',
            sedol: null,
            ticker_symbol: 'CUR:USD',
            type: 'cash',
            unofficial_currency_code: null,
        },
        {
            close_price: 49.25,
            close_price_as_of: '2022-06-21',
            cusip: '922907746',
            institution_id: null,
            institution_security_id: null,
            is_cash_equivalent: false,
            isin: 'US9229077469',
            iso_currency_code: 'USD',
            name: 'Vanguard Tax-Exempt Bond',
            proxy_security_id: null,
            security_id: '8wyZkVZm60synVQxLxVMHn0jB5jZJat5krq4q',
            sedol: null,
            ticker_symbol: 'VTEB',
            type: 'etf',
            unofficial_currency_code: null,
        },
        {
            close_price: 44.08,
            close_price_as_of: '2022-06-21',
            cusip: '808524102',
            institution_id: null,
            institution_security_id: null,
            is_cash_equivalent: false,
            isin: 'US8085241029',
            iso_currency_code: 'USD',
            name: 'Schwab U.S. Broad Market ETF',
            proxy_security_id: null,
            security_id: 'KdDjmojBERUKxX8Ln6wdUadEgLE7o5cZ306Xk',
            sedol: 'B5BQNM4',
            ticker_symbol: 'SCHB',
            type: 'etf',
            unofficial_currency_code: null,
        },
        {
            close_price: 140.97,
            close_price_as_of: '2022-06-21',
            cusip: '921908844',
            institution_id: null,
            institution_security_id: null,
            is_cash_equivalent: false,
            isin: 'US9219088443',
            iso_currency_code: 'USD',
            name: 'Vanguard Dividend Appreciation ETF',
            proxy_security_id: null,
            security_id: 'NLqaJoaK5wFr6M0gmB01cnQpgJpNk6tKzrE74',
            sedol: 'B13V1N6',
            ticker_symbol: 'VIG',
            type: 'etf',
            unofficial_currency_code: null,
        },
        {
            close_price: 41.8,
            close_price_as_of: '2022-06-21',
            cusip: '922042858',
            institution_id: null,
            institution_security_id: null,
            is_cash_equivalent: false,
            isin: 'US9220428588',
            iso_currency_code: 'USD',
            name: 'Vanguard MSCI Emerging Markets ETF',
            proxy_security_id: null,
            security_id: 'VK0EQ5Ea13u9QqNrYJ9qINz0Jd0ZYMHQ79bd0',
            sedol: 'B06HMH5',
            ticker_symbol: 'VWO',
            type: 'etf',
            unofficial_currency_code: null,
        },
        {
            close_price: 71.97,
            close_price_as_of: '2022-06-21',
            cusip: '808524797',
            institution_id: null,
            institution_security_id: null,
            is_cash_equivalent: false,
            isin: 'US8085247976',
            iso_currency_code: 'USD',
            name: 'Schwab U.S. Dividend Equity ETF',
            proxy_security_id: null,
            security_id: 'XARE85EJqKsjxyPpp93mtPABJMBv8Nf7jxaDo',
            sedol: 'B5MPY72',
            ticker_symbol: 'SCHD',
            type: 'etf',
            unofficial_currency_code: null,
        },
        {
            close_price: 31.76,
            close_price_as_of: '2022-06-21',
            cusip: '808524805',
            institution_id: null,
            institution_security_id: null,
            is_cash_equivalent: false,
            isin: 'US8085248057',
            iso_currency_code: 'USD',
            name: 'Schwab International Equity ETF',
            proxy_security_id: null,
            security_id: 'x1RMwKMjNqsm40xmAAbVFoXN4rNVJ5cLpvR45',
            sedol: 'B5BQR88',
            ticker_symbol: 'SCHF',
            type: 'etf',
            unofficial_currency_code: null,
        },
    ],
})

export const investmentTransactionsGetResponse =
    TestUtil.axiosSuccess<InvestmentsTransactionsGetResponse>({
        request_id: 'eNt6Lip8b5NSbKx',
        accounts,
        item,
        total_investment_transactions: 19,
        investment_transactions: [
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: 42.9,
                cancel_transaction_id: null,
                date: '2022-06-16',
                fees: 0,
                investment_transaction_id: '7J1QBx4ZzQfMQ8rrqLMqt7njK3q9bDt8AgMKV',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 42.9,
                quantity: 1,
                security_id: 'KdDjmojBERUKxX8Ln6wdUadEgLE7o5cZ306Xk',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: 917.04,
                cancel_transaction_id: null,
                date: '2022-06-16',
                fees: 0,
                investment_transaction_id: 'gwarYP7d6rsAwQ889VA9IBNZ5JyjgwI6mNwQz',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 48.27,
                quantity: 19,
                security_id: '6aEJyVJ5dAsP6RKmkjoPC9BEkeEYpKu6ZqObP',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: -943.98,
                cancel_transaction_id: null,
                date: '2022-06-16',
                fees: 0,
                investment_transaction_id: 'bVMkYwRqmkf5k0jjKq5KCpXN59QDdbtPORy48',
                iso_currency_code: 'USD',
                name: 'automated transaction - Sell',
                price: 41.04,
                quantity: -23,
                security_id: 'VK0EQ5Ea13u9QqNrYJ9qINz0Jd0ZYMHQ79bd0',
                subtype: InvestmentTransactionSubtype.Sell,
                type: InvestmentTransactionType.Sell,
                unofficial_currency_code: null,
            },
            {
                account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
                amount: 8,
                cancel_transaction_id: null,
                date: '2022-06-14',
                fees: 0,
                investment_transaction_id: '0vOzwnRxMzCwkXmmd3wdC0NPBmpXE9f9DOnBO',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 10.01,
                quantity: 0.7992,
                security_id: 'eJXpMzpR65FkBv0k60zytBaE85EjmMfnE9r1R',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
                amount: 12,
                cancel_transaction_id: null,
                date: '2022-06-14',
                fees: 0,
                investment_transaction_id: 'jDpxz3nL1xFABQppjwAjIxnVb1joLMHvb5Pkq',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 13.05,
                quantity: 0.9195,
                security_id: 'JmN0JX0q5Ecg57nBygMDHYzMgoMr6psbeJjZL',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
                amount: 13,
                cancel_transaction_id: null,
                date: '2022-06-14',
                fees: 0,
                investment_transaction_id: 'x4Xy3rPVayf0nrqqYK0YIPdzrO8J1EFmVq0pz',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 14.36,
                quantity: 0.9053,
                security_id: 'M654JE4yQdCL1Op8PXNqiZJ3Lo34kKHMLZxnA',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
                amount: 15,
                cancel_transaction_id: null,
                date: '2022-06-14',
                fees: 0,
                investment_transaction_id: 'rkpDLrdZmDUAPYnnm5AmINAqOVMpvEIrnN4jQ',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 18.95,
                quantity: 0.7916,
                security_id: 'kZrEbXELBVCKoYwBVxeQt5xO8JOy1qtRnzQVz',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
                amount: 15,
                cancel_transaction_id: null,
                date: '2022-06-14',
                fees: 0,
                investment_transaction_id: 'vjpBqgD7rBt86V11A38ASpy3NVMw4AtpvK1Px',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 10.76,
                quantity: 1.3941,
                security_id: '54jm3zmZ7kFgAbJpv8EbF5b4KA4V8atB3jJP0',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
                amount: 17,
                cancel_transaction_id: null,
                date: '2022-06-14',
                fees: 0,
                investment_transaction_id: 'a9RKYd0yZKi5O0qqPz5PCQyPj4Dv51fKzxk3d',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 13.1,
                quantity: 1.2977,
                security_id: 'x1RMwKMjNqsgkVwbOdMyUoXN4rNVJ5cM9wZ0E',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
                amount: 20,
                cancel_transaction_id: null,
                date: '2022-06-14',
                fees: 0,
                investment_transaction_id: '4m6O1nezMOT16pvvaM1atyDMbjOoa9fDZx5zL',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 18.8,
                quantity: 1.0638,
                security_id: '3mg4qV4JZycL34xMvXVzsbEgn8gLKkUKR3am8',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'QARaYk0Mqaf19ERRdX1dtxr5OKRoPQUoDZ3JoL',
                amount: -100,
                cancel_transaction_id: null,
                date: '2022-06-14',
                fees: 0,
                investment_transaction_id: 'V48mYXDbkmf6PN55Ab6rSd16AgkVOECJJAMz5n',
                iso_currency_code: 'USD',
                name: 'deposit automated transaction Deposit',
                price: 0,
                quantity: 0,
                security_id: null,
                subtype: InvestmentTransactionSubtype.Deposit,
                type: InvestmentTransactionType.Cash,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: 132.72,
                cancel_transaction_id: null,
                date: '2022-06-13',
                fees: 0,
                investment_transaction_id: 'EwRq8dLYMqs8ZnYYrz8rSAm3YEZPvqidN40KY',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 44.24,
                quantity: 3,
                security_id: 'KdDjmojBERUKxX8Ln6wdUadEgLE7o5cZ306Xk',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: 142.61,
                cancel_transaction_id: null,
                date: '2022-06-13',
                fees: 0,
                investment_transaction_id: 'RvRxYAdMBxC7zN88Kw7KIJ9y81bQKVt9gaE6D',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 142.61,
                quantity: 1,
                security_id: 'NLqaJoaK5wFr6M0gmB01cnQpgJpNk6tKzrE74',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: 927.13,
                cancel_transaction_id: null,
                date: '2022-06-13',
                fees: 0,
                investment_transaction_id: 'M3R0VBKDL0IrveBBPKrPhqDvoPjk5YS0w6nAN',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 31.97,
                quantity: 29,
                security_id: 'x1RMwKMjNqsm40xmAAbVFoXN4rNVJ5cLpvR45',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: -875.17,
                cancel_transaction_id: null,
                date: '2022-06-13',
                fees: 0,
                investment_transaction_id: 'V48mYXDbkmf6PN55Ab6AixOQdk1Yr8HnKvA00',
                iso_currency_code: 'USD',
                name: 'automated transaction - Sell',
                price: 41.67,
                quantity: -21,
                security_id: '0AZ0De04KqsreZXmgX0dT1VgMBgJXzsMPgmjO',
                subtype: InvestmentTransactionSubtype.Sell,
                type: InvestmentTransactionType.Sell,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: -72.85,
                cancel_transaction_id: null,
                date: '2022-06-13',
                fees: 0,
                investment_transaction_id: 'OKXrYyAM1rfBN9AALVBLsm5BA40p8jtp9jB7n',
                iso_currency_code: 'USD',
                name: 'automated transaction - Sell',
                price: 72.85,
                quantity: -1,
                security_id: 'XARE85EJqKsjxyPpp93mtPABJMBv8Nf7jxaDo',
                subtype: InvestmentTransactionSubtype.Sell,
                type: InvestmentTransactionType.Sell,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: -200,
                cancel_transaction_id: null,
                date: '2022-06-13',
                fees: 0,
                investment_transaction_id: 'dMavYLmqbvspezDD3kp7hL4jEkozwDtPPma8pO',
                iso_currency_code: 'USD',
                name: 'deposit automated transaction Deposit',
                price: 0,
                quantity: 0,
                security_id: null,
                subtype: InvestmentTransactionSubtype.Deposit,
                type: InvestmentTransactionType.Cash,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: 2754.6,
                cancel_transaction_id: null,
                date: '2022-06-10',
                fees: 0,
                investment_transaction_id: 'pyp6wx7OK6HjN766D9jDF1aj43Myk6IAmRM0Y',
                iso_currency_code: 'USD',
                name: 'automated transaction - Buy',
                price: 45.91,
                quantity: 60,
                security_id: 'KdDjmojBERUKxX8Ln6wdUadEgLE7o5cZ306Xk',
                subtype: InvestmentTransactionSubtype.Buy,
                type: InvestmentTransactionType.Buy,
                unofficial_currency_code: null,
            },
            {
                account_id: 'nBpdYA7Z3dfKXQNNAxKAtK6ZO7m48JFXndO7Ln',
                amount: -2741.06,
                cancel_transaction_id: null,
                date: '2022-06-10',
                fees: 0,
                investment_transaction_id: 'nBpdYA7Z3dfKXQNNAxKAtK6NmBeQrqHjVKPmD',
                iso_currency_code: 'USD',
                name: 'automated transaction - Sell',
                price: 195.79,
                quantity: -14,
                security_id: 'bn4Q8gQOBJt1AbD8B9eDtLYEO5EBD1FqXRpYZ',
                subtype: InvestmentTransactionSubtype.Sell,
                type: InvestmentTransactionType.Sell,
                unofficial_currency_code: null,
            },
        ],
        securities: [
            {
                close_price: 40.53,
                close_price_as_of: '2022-06-22',
                cusip: '921943858',
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: 'US9219438580',
                iso_currency_code: 'USD',
                name: 'Vanguard MSCI EAFE ETF',
                proxy_security_id: null,
                security_id: '0AZ0De04KqsreZXmgX0dT1VgMBgJXzsMPgmjO',
                sedol: 'B23MX41',
                ticker_symbol: 'VEA',
                type: 'etf',
                unofficial_currency_code: null,
            },
            {
                close_price: null,
                close_price_as_of: null,
                cusip: null,
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: null,
                iso_currency_code: 'USD',
                name: null,
                proxy_security_id: null,
                security_id: '3mg4qV4JZycL34xMvXVzsbEgn8gLKkUKR3am8',
                sedol: null,
                ticker_symbol: 'U.S.STOCKS',
                type: 'other',
                unofficial_currency_code: null,
            },
            {
                close_price: null,
                close_price_as_of: null,
                cusip: null,
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: null,
                iso_currency_code: 'USD',
                name: null,
                proxy_security_id: null,
                security_id: '54jm3zmZ7kFgAbJpv8EbF5b4KA4V8atB3jJP0',
                sedol: null,
                ticker_symbol: 'CORPORATE.BONDS',
                type: 'other',
                unofficial_currency_code: null,
            },
            {
                close_price: 48.46,
                close_price_as_of: '2022-06-22',
                cusip: '46434G103',
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: 'US46434G1031',
                iso_currency_code: 'USD',
                name: 'iShares Core MSCI Emerging Market',
                proxy_security_id: null,
                security_id: '6aEJyVJ5dAsP6RKmkjoPC9BEkeEYpKu6ZqObP',
                sedol: 'B8NDCB6',
                ticker_symbol: 'IEMG',
                type: 'etf',
                unofficial_currency_code: null,
            },
            {
                close_price: null,
                close_price_as_of: null,
                cusip: null,
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: null,
                iso_currency_code: 'USD',
                name: null,
                proxy_security_id: null,
                security_id: 'JmN0JX0q5Ecg57nBygMDHYzMgoMr6psbeJjZL',
                sedol: null,
                ticker_symbol: 'REAL.ESTATE',
                type: 'other',
                unofficial_currency_code: null,
            },
            {
                close_price: 43.86,
                close_price_as_of: '2022-06-22',
                cusip: '808524102',
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: 'US8085241029',
                iso_currency_code: 'USD',
                name: 'Schwab U.S. Broad Market ETF',
                proxy_security_id: null,
                security_id: 'KdDjmojBERUKxX8Ln6wdUadEgLE7o5cZ306Xk',
                sedol: 'B5BQNM4',
                ticker_symbol: 'SCHB',
                type: 'etf',
                unofficial_currency_code: null,
            },
            {
                close_price: null,
                close_price_as_of: null,
                cusip: null,
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: null,
                iso_currency_code: 'USD',
                name: null,
                proxy_security_id: null,
                security_id: 'M654JE4yQdCL1Op8PXNqiZJ3Lo34kKHMLZxnA',
                sedol: null,
                ticker_symbol: 'EMERGING.MARKETS',
                type: 'other',
                unofficial_currency_code: null,
            },
            {
                close_price: 141.11,
                close_price_as_of: '2022-06-22',
                cusip: '921908844',
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: 'US9219088443',
                iso_currency_code: 'USD',
                name: 'Vanguard Dividend Appreciation ETF',
                proxy_security_id: null,
                security_id: 'NLqaJoaK5wFr6M0gmB01cnQpgJpNk6tKzrE74',
                sedol: 'B13V1N6',
                ticker_symbol: 'VIG',
                type: 'etf',
                unofficial_currency_code: null,
            },
            {
                close_price: 41.11,
                close_price_as_of: '2022-06-22',
                cusip: '922042858',
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: 'US9220428588',
                iso_currency_code: 'USD',
                name: 'Vanguard MSCI Emerging Markets ETF',
                proxy_security_id: null,
                security_id: 'VK0EQ5Ea13u9QqNrYJ9qINz0Jd0ZYMHQ79bd0',
                sedol: 'B06HMH5',
                ticker_symbol: 'VWO',
                type: 'etf',
                unofficial_currency_code: null,
            },
            {
                close_price: 70.9,
                close_price_as_of: '2022-06-22',
                cusip: '808524797',
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: 'US8085247976',
                iso_currency_code: 'USD',
                name: 'Schwab U.S. Dividend Equity ETF',
                proxy_security_id: null,
                security_id: 'XARE85EJqKsjxyPpp93mtPABJMBv8Nf7jxaDo',
                sedol: 'B5MPY72',
                ticker_symbol: 'SCHD',
                type: 'etf',
                unofficial_currency_code: null,
            },
            {
                close_price: 188.13,
                close_price_as_of: '2022-06-22',
                cusip: '922908769',
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: 'US9229087690',
                iso_currency_code: 'USD',
                name: 'Vanguard Group, Inc. - Vanguard Total Stock Market ETF',
                proxy_security_id: null,
                security_id: 'bn4Q8gQOBJt1AbD8B9eDtLYEO5EBD1FqXRpYZ',
                sedol: '2762568',
                ticker_symbol: 'VTI',
                type: 'etf',
                unofficial_currency_code: null,
            },
            {
                close_price: null,
                close_price_as_of: null,
                cusip: null,
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: null,
                iso_currency_code: 'USD',
                name: null,
                proxy_security_id: null,
                security_id: 'eJXpMzpR65FkBv0k60zytBaE85EjmMfnE9r1R',
                sedol: null,
                ticker_symbol: 'EMERGING.MARKET.BONDS',
                type: 'other',
                unofficial_currency_code: null,
            },
            {
                close_price: null,
                close_price_as_of: null,
                cusip: null,
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: null,
                iso_currency_code: 'USD',
                name: null,
                proxy_security_id: null,
                security_id: 'kZrEbXELBVCKoYwBVxeQt5xO8JOy1qtRnzQVz',
                sedol: null,
                ticker_symbol: 'DIVIDEND.STOCKS',
                type: 'other',
                unofficial_currency_code: null,
            },
            {
                close_price: null,
                close_price_as_of: null,
                cusip: null,
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: null,
                iso_currency_code: 'USD',
                name: null,
                proxy_security_id: null,
                security_id: 'x1RMwKMjNqsgkVwbOdMyUoXN4rNVJ5cM9wZ0E',
                sedol: null,
                ticker_symbol: 'FOREIGN.STOCKS',
                type: 'other',
                unofficial_currency_code: null,
            },
            {
                close_price: 31.25,
                close_price_as_of: '2022-06-22',
                cusip: '808524805',
                institution_id: null,
                institution_security_id: null,
                is_cash_equivalent: false,
                isin: 'US8085248057',
                iso_currency_code: 'USD',
                name: 'Schwab International Equity ETF',
                proxy_security_id: null,
                security_id: 'x1RMwKMjNqsm40xmAAbVFoXN4rNVJ5cLpvR45',
                sedol: 'B5BQR88',
                ticker_symbol: 'SCHF',
                type: 'etf',
                unofficial_currency_code: null,
            },
        ],
    })

// This connection has no regular transactions
export const transactionsGetResponse = TestUtil.axiosSuccess<TransactionsGetResponse>({
    accounts,
    item,
    request_id: 'VYybyWkcRp4gT6W',
    total_transactions: 0,
    transactions: [],
})

// This connection has no liabilities
export const liabilitiesGetResponse = TestUtil.axios400Error({
    display_message: null,
    documentation_url: 'https://plaid.com/docs/?ref=error#item-errors',
    error_code: 'PRODUCTS_NOT_SUPPORTED',
    error_message: 'the following products are not supported by this institution: ["liabilities"]',
    error_type: 'ITEM_ERROR',
    request_id: 'pwINPLaeVmixWgC',
    suggested_action: null,
})
